/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-27 15:21:29
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-27 15:31:37
 * @别瞎看: 你个无脑牛马

/**
 * Test03Student
 */

import java.util.ArrayList;
import java.util.Collection;

public class Test03Student {

    public static void main(String[] args) {
        //创建一些学生对象
        Student s1=new Student("s1",20);
        Student s2=new Student("s2",18);
        Student s3=new Student("s3",19);
        Student s4=new Student("s4",21);
        Student s5=new Student("s5",20);
        //创建一个集合对象
        Collection<Student> coll=new ArrayList<Student>();
        //将学生对象添加到集合中
        coll.add(s1);
        coll.add(s2);
        coll.add(s3);
        coll.add(s4);
        coll.add(s5);
        System.out.println(coll);
        System.out.println(coll.size());
        //判断是否包含元素
        System.out.println(coll.contains(s1));
        //删除元素
        System.out.println(coll.remove(s5));
        System.out.println(coll);
        System.out.println(coll.size());
        
    }
}